import request from '@/utils/request'

export default {
    //注册用户
    registUser(registDto) {
        return request({
            url: `/api/admin/regist`,
            method: 'post',
            data: registDto
        })
    },
    //查询用户信息
    getUserListPage(current, limit, userDto) {

        return request({
            url: `/api/admin/pageUser/${current}/${limit}`,
            method: 'post',
            data: userDto
        })
    },
    //查询单个用户信息
    selectUserByJobNum(jobNum){
        return request({
            url: `/api/admin/selectUserByJobNum/${jobNum}`,
            method: 'get'
        })
    },
    //修改用户信息
    editUser(user){
        return request({
            url: `/api/admin/editUser`,
            method: 'post',
            data: user
        })
    },
    //删除用户
    delUser(jobNum){
        return request({
            url: `/api/admin/delUser/${jobNum}`,
            method: 'delete'
        })
    }
}

